package com.czwj.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.czwj.dao.DepartmentMapper;
import com.czwj.entities.Department;
import com.czwj.service.DepartmentService;

/**
* @ClassName: DepartmentServiceImpl
* @Description: TODO
* @author H
* @date 2020年4月20日
*
*/
@Service
public class DepartmentServiceImpl implements DepartmentService{
	@Resource
	DepartmentMapper mapper;
	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.DepartmentService#search(java.util.Map)
	*/
	@Override
	public List<Department> search(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.search(map);
	}
	
	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.DepartmentService#count(java.util.Map)
	*/
	@Override
	public int count(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.count(map);
	}
	
	/** 
	* 
	* @param department
	* @return
	* @see com.czwj.service.DepartmentService#update(com.czwj.entities.Department)
	*/
	@Override
	public int update(Department department){
		// TODO Auto-generated method stub
		return this.mapper.updateByPrimaryKeySelective(department);
	}
	
	/** 
	* 
	* @param department
	* @return
	* @see com.czwj.service.DepartmentService#insert(com.czwj.entities.Department)
	*/
	@Override
	public int insert(Department department){
		// TODO Auto-generated method stub
		return this.mapper.insertSelective(department);
	}
	
	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.DepartmentService#updateStatus(java.util.Map)
	*/
	@Override
	public int updateStatus(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.updateStatus(map);
	}

	/** 
	* 
	* @param projectitemid
	* @return
	* @see com.czwj.service.DepartmentService#searchByProjectItem(java.lang.Integer)
	*/
	@Override
	public List<Department> searchByProjectItem(Integer projectitemid){
		// TODO Auto-generated method stub
		return this.mapper.searchByProjectItem(projectitemid);
	}
}
